const puppeteer = require("puppeteer");
const moment = require("moment")(async () => {
  let date = moment();
  let info = { date: date.format("YYYY-MM-DD") };
  console.log("info", info);
  const browser = await puppeteer.launch({
    // browserWSEndpoint,
    headless: false,
    userDataDir: "./userData",
  });
  // 打开一个新页面
  const page = await browser.newPage();

  // 导航到指定的URL
  await page.goto(
    "https://www.iwencai.com/unifiedwap/result?w=%E5%90%8C%E8%8A%B1%E9%A1%BA%E5%85%A8a%E4%BB%8A%E6%97%A5%E6%88%90%E4%BA%A4%E9%A2%9D&querytype=zhishu"
  );
  await page.$$eval();
})();
